import trinity

def DeviceSupportsIntZ():
    d3d = trinity.GetDirect3D()
    return d3d.CheckDeviceFormat(0, trinity.TRIDEVTYPE_HAL, d3d.GetAdapterDisplayMode()['Format'], trinity.TRIUSAGE_DEPTHSTENCIL, trinity.TRIRTYPE_SURFACE, trinity.TRIFMT_INTZ)



def DeviceSupportsRenderTargetFormat(format):
    d3d = trinity.GetDirect3D()
    return d3d.CheckDeviceFormat(0, trinity.TRIDEVTYPE_HAL, d3d.GetAdapterDisplayMode()['Format'], trinity.TRIUSAGE_RENDERTARGET, trinity.TRIRTYPE_TEXTURE, format)



